/**
 *        (c) 2013 Shanghai SDGroup Information GmbH
 *
 *        http://www.sdgroup.com/
 */

package me.cloudcat.develop.entity.configuration;

import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.ManyToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.Version;

import me.cloudcat.develop.entity.BaseEntity;

/**
 * 
 * @author ZZWang
 * @Time 2017年1月17日  下午2:55:49
 *
 */
@Entity
@Table(name = "tbl_user_role")
//@SequenceGenerator(name = "SEQ_STORE", sequenceName = "TBL_USER_ROLE_ID_ASQ", allocationSize = 1)
public class UserRole extends BaseEntity<UserRole> {

	/**
     * 
     */
	private static final long serialVersionUID = 7140678847509200059L;

	@ManyToOne(fetch = FetchType.EAGER)
	private User account;

	@ManyToOne(fetch = FetchType.EAGER)
	private Role role;

	@Version
	private int version;

	public int getVersion() {
		return version;
	}

	public void setVersion(int version) {
		this.version = version;
	}

	public User getAccount() {
		return account;
	}

	public void setAccount(User account) {
		this.account = account;
	}

	public Role getRole() {
		return role;
	}

	public void setRole(Role role) {
		this.role = role;
	}
}
